-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes #4794: Fix marketplace blanking after populating #4796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@roomote Add a test for this. |
- Add tests for displayItems initialization fix that prevents marketplace blanking - Test state management scenarios including filtering, tab switching, and error handling - Verify that displayItems properly falls back to allItems when no filters are active - Test infinite loop prevention and proper state change notifications - Ensure immutability of state objects returned by getState() Addresses comment in PR #4796: #4796 (comment)
|
This looks like it might be a proper fix, I'll move it so I can polish it up if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to replicate the issue but this change looks like it's good to have. I tested the marketplace and works correctly.
I ran pnpm check-types and pnpm test and didn't find any issues, I'm unsure what's causing the tests to fail on this PR.
Edit: the test needed to be updated to use vitest.
- Fixed state management issue in MarketplaceViewStateManager where displayItems was not properly initialized - Improved handling of marketplace items when no filters are active to ensure all items are displayed - Enhanced initial state loading logic to prevent infinite loops and ensure proper state updates - Fixed getState method to fall back to allItems when displayItems is empty The issue was caused by displayItems being set to an empty array when marketplace items were loaded, even when no filters were applied. This caused the marketplace to appear blank after loading completed.
- Add tests for displayItems initialization fix that prevents marketplace blanking - Test state management scenarios including filtering, tab switching, and error handling - Verify that displayItems properly falls back to allItems when no filters are active - Test infinite loop prevention and proper state change notifications - Ensure immutability of state objects returned by getState() Addresses comment in PR #4796: #4796 (comment)
Co-authored-by: Daniel Riccio <[email protected]>
Closes #4794
The issue was caused by displayItems being set to an empty array when marketplace items were loaded,
even when no filters were applied. This caused the marketplace to appear blank after loading completed.
Important
Fixes marketplace blanking issue by ensuring
displayItemsare properly initialized and updated inMarketplaceViewStateManager.displayItemsinitialization inMarketplaceViewStateManagerto prevent marketplace blanking when no filters are active.getStateto ensuredisplayItemsdefaults toallItemsif undefined.MarketplaceViewto prevent infinite loops.MarketplaceViewStateManager.spec.tsto verifydisplayItemsinitialization and state change notifications.displayItemsis never empty whenallItemshas content and no filters are active.This description was created by
for 5ff1732. You can customize this summary. It will automatically update as commits are pushed.